// 支付合约
const loanAbi = {
  abi:[
    {
        "inputs": [],
        "stateMutability": "nonpayable",
        "type": "constructor"
    },
    {
        "inputs": [],
        "name": "borrowRate",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "orderId",
                "type": "uint256"
            }
        ],
        "name": "cancelLoan",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "orderId",
                "type": "uint256"
            },
            {
                "internalType": "address",
                "name": "tarder",
                "type": "address"
            }
        ],
        "name": "changeTarder",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "orderId",
                "type": "uint256"
            }
        ],
        "name": "clearLoan",
        "outputs": [],
        "stateMutability": "payable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "orderId",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "amount",
                "type": "uint256"
            }
        ],
        "name": "coverLoan",
        "outputs": [],
        "stateMutability": "payable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "amount",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "orderType",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "duration",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "interestRate",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "tip",
                "type": "uint256"
            },
            {
                "internalType": "address",
                "name": "tarder",
                "type": "address"
            },
            {
                "internalType": "uint256",
                "name": "way",
                "type": "uint256"
            },
            {
                "internalType": "bool",
                "name": "isCloseOut",
                "type": "bool"
            },
            {
                "internalType": "string",
                "name": "remark",
                "type": "string"
            }
        ],
        "name": "createOrder",
        "outputs": [],
        "stateMutability": "payable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "orderId",
                "type": "uint256"
            }
        ],
        "name": "getLoan",
        "outputs": [],
        "stateMutability": "payable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "orderId",
                "type": "uint256"
            }
        ],
        "name": "getOrderById",
        "outputs": [
            {
                "components": [
                    {
                        "internalType": "uint256",
                        "name": "id",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "amount",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "amountVDS",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "orderType",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "duration",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "interestRate",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "createTime",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "getTime",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "returnTime",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "status",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "tip",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "way",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "borrowRate",
                        "type": "uint256"
                    },
                    {
                        "internalType": "bool",
                        "name": "isCloseOut",
                        "type": "bool"
                    },
                    {
                        "internalType": "address",
                        "name": "owner",
                        "type": "address"
                    },
                    {
                        "internalType": "address",
                        "name": "getOwner",
                        "type": "address"
                    },
                    {
                        "internalType": "address",
                        "name": "lender",
                        "type": "address"
                    },
                    {
                        "internalType": "address",
                        "name": "borrower",
                        "type": "address"
                    },
                    {
                        "internalType": "address",
                        "name": "tarder",
                        "type": "address"
                    },
                    {
                        "internalType": "string",
                        "name": "remark",
                        "type": "string"
                    }
                ],
                "internalType": "struct Loan.LoanOrder",
                "name": "",
                "type": "tuple"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "page",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "pageSize",
                "type": "uint256"
            }
        ],
        "name": "getPendingLoanOrders",
        "outputs": [
            {
                "components": [
                    {
                        "internalType": "uint256",
                        "name": "id",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "amount",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "amountVDS",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "orderType",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "duration",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "interestRate",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "createTime",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "getTime",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "returnTime",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "status",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "tip",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "way",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "borrowRate",
                        "type": "uint256"
                    },
                    {
                        "internalType": "bool",
                        "name": "isCloseOut",
                        "type": "bool"
                    },
                    {
                        "internalType": "address",
                        "name": "owner",
                        "type": "address"
                    },
                    {
                        "internalType": "address",
                        "name": "getOwner",
                        "type": "address"
                    },
                    {
                        "internalType": "address",
                        "name": "lender",
                        "type": "address"
                    },
                    {
                        "internalType": "address",
                        "name": "borrower",
                        "type": "address"
                    },
                    {
                        "internalType": "address",
                        "name": "tarder",
                        "type": "address"
                    },
                    {
                        "internalType": "string",
                        "name": "remark",
                        "type": "string"
                    }
                ],
                "internalType": "struct Loan.LoanOrder[]",
                "name": "",
                "type": "tuple[]"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "getPrice",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "address",
                "name": "trader",
                "type": "address"
            },
            {
                "internalType": "uint256",
                "name": "page",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "pageSize",
                "type": "uint256"
            }
        ],
        "name": "getTraderPendingOrders",
        "outputs": [
            {
                "components": [
                    {
                        "internalType": "uint256",
                        "name": "id",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "amount",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "amountVDS",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "orderType",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "duration",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "interestRate",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "createTime",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "getTime",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "returnTime",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "status",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "tip",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "way",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "borrowRate",
                        "type": "uint256"
                    },
                    {
                        "internalType": "bool",
                        "name": "isCloseOut",
                        "type": "bool"
                    },
                    {
                        "internalType": "address",
                        "name": "owner",
                        "type": "address"
                    },
                    {
                        "internalType": "address",
                        "name": "getOwner",
                        "type": "address"
                    },
                    {
                        "internalType": "address",
                        "name": "lender",
                        "type": "address"
                    },
                    {
                        "internalType": "address",
                        "name": "borrower",
                        "type": "address"
                    },
                    {
                        "internalType": "address",
                        "name": "tarder",
                        "type": "address"
                    },
                    {
                        "internalType": "string",
                        "name": "remark",
                        "type": "string"
                    }
                ],
                "internalType": "struct Loan.LoanOrder[]",
                "name": "",
                "type": "tuple[]"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "address",
                "name": "user",
                "type": "address"
            },
            {
                "internalType": "uint256",
                "name": "page",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "pageSize",
                "type": "uint256"
            }
        ],
        "name": "getUserOrders",
        "outputs": [
            {
                "components": [
                    {
                        "internalType": "uint256",
                        "name": "id",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "amount",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "amountVDS",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "orderType",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "duration",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "interestRate",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "createTime",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "getTime",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "returnTime",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "status",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "tip",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "way",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "borrowRate",
                        "type": "uint256"
                    },
                    {
                        "internalType": "bool",
                        "name": "isCloseOut",
                        "type": "bool"
                    },
                    {
                        "internalType": "address",
                        "name": "owner",
                        "type": "address"
                    },
                    {
                        "internalType": "address",
                        "name": "getOwner",
                        "type": "address"
                    },
                    {
                        "internalType": "address",
                        "name": "lender",
                        "type": "address"
                    },
                    {
                        "internalType": "address",
                        "name": "borrower",
                        "type": "address"
                    },
                    {
                        "internalType": "address",
                        "name": "tarder",
                        "type": "address"
                    },
                    {
                        "internalType": "string",
                        "name": "remark",
                        "type": "string"
                    }
                ],
                "internalType": "struct Loan.LoanOrder[]",
                "name": "",
                "type": "tuple[]"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "address",
                "name": "user",
                "type": "address"
            },
            {
                "internalType": "uint256",
                "name": "page",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "pageSize",
                "type": "uint256"
            }
        ],
        "name": "getUserPendingOrders",
        "outputs": [
            {
                "components": [
                    {
                        "internalType": "uint256",
                        "name": "id",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "amount",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "amountVDS",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "orderType",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "duration",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "interestRate",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "createTime",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "getTime",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "returnTime",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "status",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "tip",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "way",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "borrowRate",
                        "type": "uint256"
                    },
                    {
                        "internalType": "bool",
                        "name": "isCloseOut",
                        "type": "bool"
                    },
                    {
                        "internalType": "address",
                        "name": "owner",
                        "type": "address"
                    },
                    {
                        "internalType": "address",
                        "name": "getOwner",
                        "type": "address"
                    },
                    {
                        "internalType": "address",
                        "name": "lender",
                        "type": "address"
                    },
                    {
                        "internalType": "address",
                        "name": "borrower",
                        "type": "address"
                    },
                    {
                        "internalType": "address",
                        "name": "tarder",
                        "type": "address"
                    },
                    {
                        "internalType": "string",
                        "name": "remark",
                        "type": "string"
                    }
                ],
                "internalType": "struct Loan.LoanOrder[]",
                "name": "",
                "type": "tuple[]"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "iswapContract",
        "outputs": [
            {
                "internalType": "address",
                "name": "",
                "type": "address"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "orderCount",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "",
                "type": "uint256"
            }
        ],
        "name": "orderFeeList",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "platformFee1",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "platformFee2",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "platformFee3",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "fee1",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "fee2",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "fee3",
                "type": "uint256"
            },
            {
                "internalType": "address",
                "name": "platformAddress1",
                "type": "address"
            },
            {
                "internalType": "address",
                "name": "platformAddress2",
                "type": "address"
            },
            {
                "internalType": "address",
                "name": "platformAddress3",
                "type": "address"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "orderId",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "status",
                "type": "uint256"
            }
        ],
        "name": "outOnLoan",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "owner",
        "outputs": [
            {
                "internalType": "address",
                "name": "",
                "type": "address"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "orderId",
                "type": "uint256"
            }
        ],
        "name": "pingLoan",
        "outputs": [],
        "stateMutability": "payable",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "quoterContract",
        "outputs": [
            {
                "internalType": "address",
                "name": "",
                "type": "address"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "orderId",
                "type": "uint256"
            }
        ],
        "name": "repayLoan",
        "outputs": [],
        "stateMutability": "payable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "rate",
                "type": "uint256"
            }
        ],
        "name": "setBorrowRate",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "address",
                "name": "Ucontract",
                "type": "address"
            }
        ],
        "name": "setUserContract",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "address",
                "name": "",
                "type": "address"
            },
            {
                "internalType": "uint256",
                "name": "",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "",
                "type": "uint256"
            }
        ],
        "name": "traderOrder",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "userContract",
        "outputs": [
            {
                "internalType": "address",
                "name": "",
                "type": "address"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "address",
                "name": "",
                "type": "address"
            },
            {
                "internalType": "uint256",
                "name": "",
                "type": "uint256"
            }
        ],
        "name": "userOrders",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "stateMutability": "payable",
        "type": "receive"
    }
] 
};
export { loanAbi }